"""
Project Name : api_automation_framework
File Name : absolute-redirect.py
Author : lldhsds
Date : 2024/12/29 14:40
Description: /absolute-redirect/{n} Absolutely 302 Redirects n times.
"""

import requests

def absolute_redirect_n(n: int) -> None:
    """
    /absolute-redirect/{n}, Absolutely 302 Redirects n times.
    :param n: int
    :responses 200 Absolutely 302 Redirects n times.
    """
    url = f"http://httpbin.org/absolute-redirect/{n}"
    headers = {'Accept': 'text/html'}
    response = requests.get(url, headers=headers)
    print(response.status_code)
    print(response.text)
    print(response.content)
    print(response.url)

absolute_redirect_n(3)